For allowing correction of errors in data which were caused in a data transmission or storage or reading the data to and from a memory, data are typically encoded by a code. Such a code can for example also be used to reconstruct a value provided by a PUF (Physical Uncloneable Function). In both cases it is required that an error vector in a data word (e.g. a data word received in a message or a PUF value) is determined. It is desirable that such a determination can be carried out efficiently.